<template>
  <div>
    <a-row>
      <a-col :span="5">
        <a-card>
          <p>尿液检测</p>
          <a-row>
            <a-col :span="4">
              <p class="p1"><span>{{ info1.shouldNum }}</span>次</p>
              <p class="p1">应检测</p>
            </a-col>
            <a-col :span="4">
              <p class="p1"><span>{{ info1.actualNum }}</span>次</p>
              <p class="p1">实检测</p>
            </a-col>
            <a-col :span="4">
              <p class="p1"><span>{{ info1.exemptNum }}</span>次</p>
              <p class="p1">免除</p>
            </a-col>
            <a-col :span="4">
              <p class="p1"><span>{{ info1.cancelNum }}</span>次</p>
              <p class="p1">取消</p>
            </a-col>
            <a-col :span="4" style="width: 24%;margin-right: 0;">
              <p class="p1"><span>{{ info1.ratio }}</span>次</p>
              <p class="p1">平均完成率</p>
            </a-col>
          </a-row>
        </a-card>
      </a-col>
      <a-col :span="5">
        <a-card>
          <p>毛发检测</p>
          <a-row>
            <a-col :span="4">
              <p class="p1"><span>{{ info2.shouldNum }}</span>次</p>
              <p class="p1">应检测</p>
            </a-col>
            <a-col :span="4">
              <p class="p1"><span>{{ info2.actualNum }}</span>次</p>
              <p class="p1">实检测</p>
            </a-col>
            <a-col :span="4">
              <p class="p1"><span>{{ info2.exemptNum }}</span>次</p>
              <p class="p1">免除</p>
            </a-col>
            <a-col :span="4">
              <p class="p1"><span>{{ info2.cancelNum }}</span>次</p>
              <p class="p1">取消</p>
            </a-col>
            <a-col :span="4" style="width: 24%;margin-right: 0;">
              <p class="p1"><span>{{ info2.ratio }}</span>次</p>
              <p class="p1">平均完成率</p>
            </a-col>
          </a-row>
        </a-card>
      </a-col>
      <a-col :span="5">
        <a-card>
          <p>定期访谈</p>
          <a-row>
            <a-col :span="4">
              <p class="p1"><span>{{ info3.a1 }}</span>次</p>
              <p class="p1">应访谈</p>
            </a-col>
            <a-col :span="4">
              <p class="p1"><span>{{ info3.a2 }}</span>次</p>
              <p class="p1">实访谈</p>
            </a-col>
            <a-col :span="4">
              <p class="p1"><span>{{ info3.a3 }}</span>次</p>
              <p class="p1">免除</p>
            </a-col>
            <a-col :span="4">
              <p class="p1"><span>{{ info3.a4 }}</span>次</p>
              <p class="p1">取消</p>
            </a-col>
            <a-col :span="4" style="width: 24%;margin-right: 0;">
              <p class="p1"><span>{{ info3.a5 }}</span>次</p>
              <p class="p1">平均完成率</p>
            </a-col>
          </a-row>
        </a-card>
      </a-col>
      <a-col :span="5" style="margin-right: 0;">
        <a-card>
          <p>定期报告</p>
          <a-row>
            <a-col :span="4">
              <p class="p1"><span>{{ info4.a1 }}</span>次</p>
              <p class="p1">应报告</p>
            </a-col>
            <a-col :span="4">
              <p class="p1"><span>{{ info4.a2 }}</span>次</p>
              <p class="p1">实报告</p>
            </a-col>
            <a-col :span="4">
              <p class="p1"><span>{{ info4.a3 }}</span>次</p>
              <p class="p1">取消</p>
            </a-col>
            <a-col :span="4" style="width: 24%;margin-right: 0;">
              <p class="p1"><span>{{ info4.a4 }}</span>次</p>
              <p class="p1">平均完成率</p>
            </a-col>
          </a-row>
        </a-card>
      </a-col>
    </a-row>
    <a-row>
      <a-col :span="5" style="margin-top:15px;">
        <a-card>
          <p>签到</p>
          <a-row>
            <a-col :span="4">
              <p class="p1"><span>{{ info5.a1 }}</span>次</p>
              <p class="p1">应签到</p>
            </a-col>
            <a-col :span="4">
              <p class="p1"><span>{{ info5.a2 }}</span>次</p>
              <p class="p1">实签到</p>
            </a-col>
            <a-col :span="4">
              <p class="p1"><span>{{ info5.a3 }}</span>次</p>
              <p class="p1">免除</p>
            </a-col>
            <a-col :span="4">
              <p class="p1"><span>{{ info5.a4 }}</span>次</p>
              <p class="p1">取消</p>
            </a-col>
            <a-col :span="4" style="width: 24%;margin-right: 0;">
              <p class="p1"><span>{{ info5.a5 }}</span>次</p>
              <p class="p1">平均签到率</p>
            </a-col>
          </a-row>
        </a-card>
      </a-col>
      <a-col :span="17" style="margin-top:15px;width: 74.3%;">
        <a-card>
          <p>其它介入情况</p>
          <p class="p2">请假次数 <span class="s1">{{ info6.a1 }}</span> 次；请假时长 <span class="s1">{{ info6.a2 }}</span>
            天能；接受救助帮扶 <span class="s1">{{ info6.a3 }}</span> 次；接受帮教谈心 <span class="s1">{{ info6.a4 }}</span> 次；接受心理咨询
            <span class="s1">{{ info6.a5 }}</span>
            次；接受法律援助 <span class="s1">{{ info6.a6 }}</span> 次；申请职业技能培训 <span class="s1">{{ info6.a7 }}</span> 次；参与职业技能培训
            <span class="s1">{{ info6.a8 }}</span> 次；
            提交就业意愿 <span class="s1">{{ info6.a9 }}</span> 次；就业安置 <span class="s1">{{ info6.a10 }}</span> 次；参与社区活动 <span
              class="s1">{{ info6.a11
}}</span> 次；参与小组活动 <span class="s1">{{ info6.a12 }}</span> 次；服药 <span class="s1">{{ info6.a13 }}</span> 次；
          </p>
        </a-card>
      </a-col>
    </a-row>
  </div>
</template>
<script>
import * as uroscopyApi from '@/api/sjsk/check/uroscopy.js'
export default {
  data() {
    return {
      loading: false,
      info1: {},
      info2: {},
      info3: {
        a1: '11',
        a2: '22',
        a3: '33',
        a4: '44',
        a5: '55'
      },
      info4: {
        a1: '11',
        a2: '22',
        a3: '33',
        a4: '44',
        a5: '55'
      },
      info5: {
        a1: '11',
        a2: '22',
        a3: '33',
        a4: '44',
        a5: '55'
      },
      info6: {
        a1: '11',
        a2: '22',
        a3: '33',
        a4: '44',
        a5: '55',
        a6: '11',
        a7: '22',
        a8: '33',
        a9: '44',
        a10: '55',
        a11: '55',
        a12: '55',
        a13: '55'
      }
    }
  },
  created() { },
  async mounted() {
    // this.onQuery()

  },
  methods: {
    setData(st, et, personId) {
      //尿检统计
      let params1 = {
        assessStartTime: st,
        assessEndTime: et,
        sjskPersonId: personId,
        type: 1
      }
      this.getAssessStatisticalToUrine1(params1)
      //发检统计
      let params2 = {
        assessStartTime: st,
        assessEndTime: et,
        sjskPersonId: personId,
        type: 3
      }
      this.getAssessStatisticalToUrine2(params2)
    },
    getAssessStatisticalToUrine1(params) {
      uroscopyApi.assessStatisticalToUrine(params).then((res) => {
        if (res.success) {
          this.info1 = res.result ? res.result : {}
        }
      })
    },
    getAssessStatisticalToUrine2(params) {
      uroscopyApi.assessStatisticalToUrine(params).then((res) => {
        if (res.success) {
          this.info2 = res.result ? res.result : {}
        }
      })
    },
    getData1() {
      let obj = {
        a1: this.info1.a1,
        a2: this.info1.a2,
        a3: this.info1.a3,
        a4: this.info1.a4,
        a5: this.info1.a5
      }
      let str = ""
      let objStr = JSON.stringify(obj).replace(/\"/g, "")//去掉双引号
      str = objStr.substr(1) //删除第一个字符
      str = str.substr(0, str.length - 1) //删除最后一个字符
      // console.log(str)
      return str
    },
    getData2() {
      let obj = {
        a1: this.info2.a1,
        a2: this.info2.a2,
        a3: this.info2.a3,
        a4: this.info2.a4,
        a5: this.info2.a5
      }
      let str = ""
      let objStr = JSON.stringify(obj).replace(/\"/g, "")//去掉双引号，否则带反斜杠
      str = objStr.substr(1) //删除第一个字符
      str = str.substr(0, str.length - 1) //删除最后一个字符
      // console.log(str)
      return str
    },
    getData3() {
      let obj = {
        a1: this.info3.a1,
        a2: this.info3.a2,
        a3: this.info3.a3,
        a4: this.info3.a4,
        a5: this.info3.a5
      }
      let str = ""
      let objStr = JSON.stringify(obj).replace(/\"/g, "")//去掉双引号，否则带反斜杠
      str = objStr.substr(1) //删除第一个字符
      str = str.substr(0, str.length - 1) //删除最后一个字符
      // console.log(str)
      return str
    },
    getData4() {
      let obj = {
        a1: this.info4.a1,
        a2: this.info4.a2,
        a3: this.info4.a3,
        a4: this.info4.a4,
        a5: this.info4.a5
      }
      let str = ""
      let objStr = JSON.stringify(obj).replace(/\"/g, "")//去掉双引号，否则带反斜杠
      str = objStr.substr(1) //删除第一个字符
      str = str.substr(0, str.length - 1) //删除最后一个字符
      // console.log(str)
      return str
    },
    getData5() {
      let obj = {
        a1: this.info5.a1,
        a2: this.info5.a2,
        a3: this.info5.a3,
        a4: this.info5.a4,
        a5: this.info5.a5
      }
      let str = ""
      let objStr = JSON.stringify(obj).replace(/\"/g, "")//去掉双引号，否则带反斜杠
      str = objStr.substr(1) //删除第一个字符
      str = str.substr(0, str.length - 1) //删除最后一个字符
      // console.log(str)
      return str
    },
    getData6() {
      let obj = {
        a1: this.info6.a1,
        a2: this.info6.a2,
        a3: this.info6.a3,
        a4: this.info6.a4,
        a5: this.info6.a5,
        a6: this.info6.a6,
        a7: this.info6.a7,
        a8: this.info6.a8,
        a9: this.info6.a9,
        a10: this.info6.a10,
        a11: this.info6.a11,
        a12: this.info6.a12,
        a13: this.info6.a13,
      }
      let str = ""
      let objStr = JSON.stringify(obj).replace(/\"/g, "")//去掉双引号，否则带反斜杠
      str = objStr.substr(1) //删除第一个字符
      str = str.substr(0, str.length - 1) //删除最后一个字符
      // console.log(str)
      return str
    }
  },
}
</script>
<style lang="less" scoped>
/deep/.ant-col-5 {
  width: 24%;
  margin-right: 1.2%;
}

/deep/.ant-col-4 {
  width: 14.5%;
  margin-right: 4.5%;
}

/deep/.ant-card-body {
  padding: 10px;
}

.p1 {
  margin: 0;
  font-size: 12px;

  span {
    font-size: 18px;
  }
}

.p2 {
  margin-bottom: 0;

  line-height: 21.5px;

  // font-size: 12px;
  .s1 {
    color: #1890FF;
    font-size: 16px;
  }
}
</style>
